html, body {
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  touch-action: manipulation; /* 禁用双击缩放 */
}

#app {
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
}

/* 防止页面弹跳 */
body.keyboard-active {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 处理 iOS 安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .message-input {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* 禁用文本选择 */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 允许输入框文本选择 */
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* 优化点击响应 */
button, a {
  cursor: pointer;
  touch-action: manipulation;
} 